from enum import Enum

Week=Enum('Week',('一','二','三'))

print(Week.一)
print(Week.一.name)
print(Week.一.value)
print(Week['二'])
print(Week(2))

class Person(Enum):
    east='东'
    south='南'
    west='西'
    north='北'
    def info(self):
        print('这是一个代表方向【%s】的枚举' % self.value)

print(Person.east.name)
print(Person.east.value)
print(Person.east.info())

for name,member in Person.__members__.items():
    print(str(name)+":"+str(member.value))

def sayhello():
    print("hello")